#include "custompolygonitem.h"

CustomPolygonItem::CustomPolygonItem()
{
    this->_fillColor = Qt::white;
}

void CustomPolygonItem::setFillColor(QColor color)
{
    this->_fillColor = color;
}

void CustomPolygonItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    QPainterPath painterPath;
    painterPath.addPolygon(this->polygon());

    painter->fillPath(painterPath, this->_fillColor);

    QGraphicsPolygonItem::paint(painter, option, widget);
}
